<!DOCTYPE html>
<head>
  <meta charset="utf-8">
  <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><![endif]-->
  <title>登陆</title>
  <meta name="keywords" content="" />
  <meta name="description" content="" />
  <meta name="viewport" content="width=device-width">
  <link rel="stylesheet" href="<?=base_url()?>css/templatemo_main.css">
  <link rel="stylesheet" href="<?=base_url()?>css/main.css" />
  <link rel="stylesheet" href="<?=base_url()?>font/iconfont.css?v=1.1" />
  <script src="<?=base_url()?>js/jquery.min.js"></script>
   <script src="<?=base_url()?>js/bootstrap.min.js"></script>
   <script src="<?=base_url()?>js/Chart.min.js"></script>
   <script src="<?=base_url()?>js/templatemo_script.js"></script>
   <style type="text/css">
   body{
   	padding-top:80px;
   }
   	.templatemo-signin-form{
   		background: #fff;
   		border:1px #ccc solid;
   		margin-top:15px;
   		padding:25px 10px 10px 10px;
   		border-top: 2px #428bca solid;
   	}

   	.logo{
   		text-align: center;
   		width: 100%;
   		color:#428bca;
   	}

   	.copyright{
   		color:#999;
   		text-align: center;
   		padding-top:20px;
   	}
   </style>
</head>
<body>
<div id="main-wrapper">
	 <h1 class="logo"><?=SYSTEM_NAME?></h1>
	<div class="template-page-wrapper2">
		<form class="form-horizontal templatemo-signin-form" style="max-width:400px;" role="form"  onsubmit="return false;">

			<div class="form-group">
				<div class="col-md-12">

					<div class="input-group">
						<div class="input-group-addon"><i class="icon iconfont icon-people" style="width:30px;"></i></div>
						<input type="text" class="form-control input-lg" id="username" placeholder="请输入用户名">
					</div>
				</div>
			</div>
			<div class="form-group">
				<div class="col-md-12">

					<div class="input-group">
						<div class="input-group-addon"><i class="icon iconfont icon-lock" style="width:30px;"></i></div>
						<input type="password" class="form-control input-lg" id="password" placeholder="请输入密码">
					</div>
				</div>
			</div>
			<div class="form-group">
				<div class="col-md-12">
					<div class="">
						<input type="submit" value="登 陆" class=" btn btn-primary btn-lg" style="width:100%;" id="submit_btn">
					</div>
				</div>
			</div>
		</form>


	</div>
	<div class="copyright"></div>
</div>


<!--[if lt IE 9]>
<div class="update-notice">
  <div class="update-content">
    <p style="padding-top:20px;font-size:20px;">您的浏览器存在安全隐患，建议升级到现代浏览器 </p>
    <p><a href="http://rj.baidu.com/soft/detail/14744.html?ald" target="_blank"><i class="icon iconfont icon-down"></i> 点击下载最新浏览器（Windows7及以上）</a>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

        <a href="http://admin.superkitchen.cn/download/chrome_xp.exe"><i class="icon iconfont icon-down"></i> 点击下载Windows XP版本浏览器</a>
    </p>

  </div>
</div>
<![endif]-->

<script>
	$(document).ready(function() {
		$("#submit_btn").click(function() {
			var username = $("#username").val();
			var password = $("#password").val();
			$.ajax({
				url : '<?php echo site_url('passport/login')?>',
				type : "post",
				async : true,
				data : {
					'username' : username,
					'password' : password
				},
				dataType : "json",
				success : function(data) {
					if(data.code)
					{
						window.location.href='<?php echo site_url('product/index')?>';
					}else{
						alert(data.msg);
					}
				}
			});
		});
	});
</script>

</body>

</html>
